<?php

$traduccion = new Zend_Translate('array', APPLICATION_PATH . '/idiomas/es.php', 'es');  
Zend_Form::setDefaultTranslator($traduccion); 

class Blog_Form_Comentario extends Zend_Form
{

    protected function generaDecorador($id) {
         return array(
                    'Errors',
                    'ViewHelper',
                    'Description',
                    array('Label',array('class' => 'imitar_h2')),
                    array('HtmlTag', array('tag' => 'Fieldset', 'id' => $id, 'class' => 'elemento' ))
                ); 
    }
    
    public function init()
    {
        
        $this->addElement(
            'textarea', 'texto', array(
                    'decorators' => $this->generaDecorador("fieldset_texto"),
                    'label' => 'Comentario:',
                    'required' => true
                )
        );
        
        $this->addElement(
            'submit', 'Guardar', array('class' => 'btn btn-large btn-warning')
        );
                        
    }

}

